1. Field of the Invention
The present invention relates to computer software, and more particularly to displaying database record organization data of IMS databases.
2. Description of the Related Art
The IMS database (IMS DB) was created in 1970 by International Business Machines Corporation (IBM) and is one of the two major parts to IBM's IMS/ESA (Information Management System/Enterprise Systems Architecture). The second part is a data communications system (IMS Transaction Manager or IMS TM). Together, the transaction manager and the database manager create a complete online transaction processing environment providing continuous availability and data integrity. IMS/ESA runs under the MVS/ESA or OS/390 operating systems, which run on the S/390 platform.
At the heart of IMS DB are its databases and its data manipulation language, Data Language/I (DL/I). The IMS database is a hierarchical (non-relational) database. IMS databases are hierarchic collections of data, information organized in a pyramid fashion with data at each level of the hierarchy related to, and in some way dependent upon, data at the higher level of the hierarchy. DL/I calls allows a user to create and access these IMS databases.
An IMS database may include one or more data set groups. Each data set group may include one or more segments. A segment is the smallest piece of data DL/I can store. Each segment may be qualified by its hierarchical relationship to other segments in a database record. Each database record has one root segment and zero or more child segments. A “root segment” is at the top of the hierarchy, and there may be only one root segment in a database record. All other segments (other than the one root segment) in a database record are referred to as “dependent segments”, and their existence depends on there being a root segment. A “parent segment” is any segment that is defined in the database descriptor (DBD) as capable of having a dependent segment beneath it in the hierarchy. A “child segment” is any segment that is a dependent of another segment above it in the hierarchy.
Segments may be of various segment types. Those segments which share similar qualities are of the same type. For example, if the root segment of a database record represents a course, and that root segment has three child segments labeled: instructor, student, and location, those child segments may be referred to as segment types.
The root segment is referred to as a first level of the IMS database, and direct children of the root segment are referred to as a second level of the IMS database. As used herein, a second level of the IMS database may alternatively be referred to as a first level child segment, as child segments may only appear starting with the second level of the IMS database. Similarly, children of the children of the root segment (i.e., grandchildren of the root segment) are referred to as a third level of the IMS database, or alternatively, second level child segments. The level of each subsequent generation of children may be determined by incremented the previous level by one (e.g., a fourth level of the IMS database is equivalent to a third level child segment).
An IMS database includes a maximum of ten data set groups into which segments of an IMS database may be written. Each segment type may only be assigned to one data set group. When IMS databases are created, definitions of which data set group each segment type is to be written to are specified. In some cases, an IMS database may also be divided into partitions, in addition to being distributed across data set groups. A database record is made up of a root segment and child segments. As an IMS database is used, segments and database records are added, modified and deleted. Over time, the child segments of a database record may become scattered across different blocks within a data set group, resulting in slower access times and longer latencies than would occur if the child segments were closer together or contiguous. Reorganizing the location of the various segments of an IMS database such that segments of database records are closer together results in faster access times and shorter latencies.
The need to periodically reorganize an IMS database stems from the dynamic nature of insertions and deletions of segments in an IMS database. In general, as new child segments are added to an IMS database hierarchy, the segments may be added to blocks depending on space availability. As a result, related segments (i.e., segments belonging to the same database record) may be stored in different blocks, possibly non-contiguous blocks. Due to this scattering of related segments across different blocks within a data set group, over time, the IMS database becomes fragmented. Fragmentation exists in both segment to segment access and distribution of free space within the blocks. As a result, access of a database record may require reading a number of non-contiguous blocks, which results in lengthier access times. One method of reducing access times is to reorganize the IMS database in order to more closely position segments belonging to the same database record and to re-distribute areas of free space for later insertions.
The current technique of timing reorganizations of IMS databases (i.e., deciding when to initiate a reorganization) is typically based on either a temporal trigger (e.g., daily, weekly, monthly, quarterly), a volume trigger (e.g., after 1,000 transactions), or a shortage of free space available to hold new database data. Failure to detect or anticipate a shortage of free space may cause the database and supporting applications to suffer an ‘outage’ and therefore be unable to perform important business tasks. Failure of the applications to perform the business tasks may result in significant lost revenue and business opportunities. It is desirable to have a method of analyzing database record organization characteristics that may be able to recognize that the amount and distribution of free space available in an IMS database (or even a selected block or data set group subset of an IMS database) is approaching a threshold. Reaching this threshold would indicate either a benefit from reorganizing the IMS database or the potential for a database ‘outage’ due to lack of free space.
A visual or graphical representation of the database record organization may allow an ‘outage’ to be avoided. A visual or graphical representation of the database record organization characteristics of an IMS database may also be helpful for a DBA (database administrator) or other knowledgeable user in adjusting database parameters that control how insertions, modifications, and deletions of database records within the database are managed. It is desirable for a DBA or other knowledgeable user to have access to the graphical representation of the database record organization characteristics of the IMS database remotely (i.e., without requiring the user to manually connect/login to the IMS database), for purposes of analysis. For at least the foregoing reasons, there is a need for an improved system and method for displaying the database record organization characteristics of databases, such as IMS databases.